<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>

<c:set var="contextRootPath" value="${pageContext.request.contextPath}" />
<c:if test="${pageContext.request.contextPath == '/'}">
	<c:set var="contextRootPath" value="" />
</c:if>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Thrift耗时统计(结果)</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css"
	href="${contextRootPath}/resource/easyui-themes/default/easyui.css" />
<link rel="stylesheet" type="text/css"
	href="${contextRootPath}/resource/easyui-themes/icon.css" />
<script language="javascript">
	// 是否需要重新刷新页面
	var g_needReloadPage = false;
</script>
<script type="text/javascript"
	src="${contextRootPath}/resource/js/jquery.easyui-1.4.min.js">
	
</script>
</head>
<body>
	<div>
		<span class="page_titile">Thrift耗时统计(结果)</span>
	</div>

	<form method="get" action="statByCode.do">
		<table class="input_table" align="center" cellspacing="0"
			cellpadding="0">
			<tr>
				<td class="input_titile_td">查询日期</td>
				<td class="input_content_td"><input class="easyui-datebox"
					type="text" name="time" value="<c:out value='${time}' />" /></td>
				<td class="input_titile_td">开始时间</td>
				<td class="input_content_td"><input class="easyui-timespinner"
					type="text" name="start_time"
					value="<c:out value='${start_time}' />" /> -- <input
					class="easyui-timespinner" type="text" name="end_time"
					value="<c:out value='${end_time}' />" /></td>
			</tr>
			<tr>
				<td class="input_titile_td">请求结果</td>
				<td class="input_content_td"><input type="text" name="result"
					value="<c:out value='${result}' />" /></td>
				<td class="input_titile_td">调用类型（0：被动调用；1：主动调用）</td>
				<td class="input_content_td"><input type="text" name="dir"
					value="<c:out value='${dir}' />" /></td>

			</tr>
			<tr>
				<td class="input_content_td" align="center" colspan="2"><input
					type="submit" value=" 搜索 " /></td>
			</tr>
		</table>
	</form>

	<table class="records_table" align="center" cellspacing="0"
		cellpadding="0">
		<tr class="records_table_head">
			<td>请求结果</td>
			<td>数量</td>
			<td>平均耗时</td>
		</tr>
		<c:forEach items="${dataList}" var="record">
			<tr class="records_table_record">
				<td><c:out value="${record.result}" /></td>
				<td><c:out value="${record.count}" /></td>
				<td><c:out value="${record.cost}" /></td>
			</tr>
		</c:forEach>
	</table>

	<div id='popupDiv'
		style="position: absolute; z-index: 9999; width: 300px; height: 250; display: none;"
		class="popup_style">
		<div class="close"
			onclick="javascript: $('#popupDiv').hide(); if (g_needReloadPage) location.reload();"></div>
		<div class="title">
			<h2 id="popupTitle"></h2>
		</div>
		<div class="content">
			<iframe id="popupIframe" src="" frameborder="0" scrolling="auto"
				width="100%" height="100%"></iframe>
		</div>
	</div>

</body>
</html>